package pratima;

import training.oop.Student;

/**
 * Immutable class should be final and no setters should be present
 * @author DemiGod
 *
 */
public final class ImmutableClass {
	
	String name;
	int id;
	
	Student student;
	//this is not valid as student object can be modified
	public Student getStudent() {
		return student;
		//create brand new student object and return it
		//this is subject mutablility
	}
	
	public ImmutableClass(String name, int id) {
		this.name = name;
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public int getId() {
		return id;
	}

}
